package com.ChefApp.mobile;

import org.jsoup.nodes.Document;

import android.app.Activity;
import android.app.ProgressDialog;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;



public class OAReceipe extends Activity {
	//Variablen
	String url,zubereitungText,zutatenText,titleText,portion1;
	String[] fileList;
	ProgressDialog loadReceipePD;
	Document rezeptSeite;
	
	Zutaten zuClass;
	TextView tvZutaten,	tvTitle, tvZubereitung,	tvSubTitle; 
	ImageView ivRec;
	Bitmap bild;
	EditText umrET;
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Bundle cicle = getIntent().getExtras();
		//url=cicle.getString("url");
       
        setContentView(R.layout.receipe);
        
        tvZutaten= (TextView) findViewById(R.id.textViewrecZutaten1);
 		tvTitle = (TextView) findViewById(R.id.textViewrec1);
 		ImageView ivBew=(ImageView) findViewById(R.id.imageViewWertung2);
 		ivBew.setVisibility(View.INVISIBLE);
 		ivRec=(ImageView) findViewById(R.id.imageViewrec1);
 		umrET=(EditText) findViewById(R.id.editTextrec1); 
 		tvZubereitung =(TextView) findViewById(R.id.textViewrecZubereitung1);
 		TextView tvDate =(TextView) findViewById(R.id.textViewDate);
 		TextView tvZeit=(TextView) findViewById(R.id.textViewzeit);
 		TextView tvAufwand=(TextView) findViewById(R.id.textViewgrad);
 		TextView tvBrenn=(TextView) findViewById(R.id.textViewBrenn);
 		TextView tvSub =(TextView) findViewById(R.id.textViewrec2);
 		Button umrButton= (Button) findViewById(R.id.buttonrec1);
 		
//        	String pathName = "/sdcard/ChefKochApp/Receipes/"+cicle.getString("image");
        	bild=(Bitmap)cicle.get("image");
//        	Log.v("recurl", pathName);
        	String zutaten = cicle.getString("zutaten");
        	String zubereitung = cicle.getString("zubereitung");
        	String title = cicle.getString("title");
        	String portion = cicle.getString("portionen");
        	String subtitle =cicle.getString("subtitle");
        	String datum = cicle.getString("date");
        	String zeit = cicle.getString("zeit");
        	String brenn = cicle.getString("brenn");
//        	String zutatOnly =cicle.getString("zutatonly");
        	String grad =cicle.getString("aufwand");
  
        	
        	tvDate.setText(datum);
        	
        	tvZeit.setText(zeit);
        	tvBrenn.setText(brenn);
        	tvAufwand.setText(grad);
        	tvZutaten.setText(zutaten);
        	tvZubereitung.setText(zubereitung);
        	tvTitle.setText(title);
        	umrET.setText(portion);
        	ivRec.setImageBitmap(bild);
        	tvSub.setText(subtitle);
        	umrButton.setClickable(false);
        	umrButton.setEnabled(false);
       };
    
   
}
